import request from '@/utils/request'

// 注册接口
export const userRegisterService = ({ account, password, role }) => {
  return request.post('/login', {
    account,
    password,
    role
  })
}

// 发送登录请求
export const userLoginService = ({ account, password, role }) =>
  request.put('/login', {
    account,
    password,
    role
  })
// 获取账号信息
export const userGetInfoService = {
  get: () => request.get('/user'),
  put: (data) => request.put('/user', data)
}
